<% sum = 0 %>
<% item.send(relationship.name).each do |record| %>
	<% sum = sum + record.send(fields[0]) %>
<% end %>
[<%= sum %>]